#!/usr/bin/env bash

# wait until the docker image exists
until docker history deis/slugrunner >/dev/null 2>&1; do
  sleep 2
done

# tag and push
docker tag deis/slugrunner:latest {{ getv "/deis/registry/host" }}:{{ getv "/deis/registry/port" }}/deis/slugrunner:latest
docker push {{ getv "/deis/registry/host" }}:{{ getv "/deis/registry/port" }}/deis/slugrunner:latest
